﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>ORDGetPointEntities2dNames</Title>
      <Author>innovoCAD</Author>
      <Description>Code snippet for getting PointEntities2d string name list.</Description>
      <HelpUrl>
      </HelpUrl>
      <Shortcut>ORDGetPointEntities2dNames</Shortcut>
    </Header>
    <Snippet>
     <References>
        <Reference>
          <Assembly>Bentley.CifNET.GeometryModel.SDK.4.0</Assembly>
        </Reference>
      </References>
      <Imports>
	  <Import>
          <Namespace>System.Collections.Generic</Namespace>
        </Import>
        <Import>
          <Namespace>SDK = Bentley.CifNET.GeometryModel.SDK</Namespace>
        </Import>
      </Imports>	
      <Code Language="vb" Delimiter="$"><![CDATA[    ''' <summary>Get PointEntities2d string name list</summary>
    Private ReadOnly Property GetPointEntities2d As List(Of String)
        Get
            Dim pointEntity2dNames As List(Of String) = New List(Of String)()

            'Checking for Active SDK connection and PointEntities2d nullification
            If SDKCon.GetActive() Is Nothing OrElse SDKCon.GetActive().PointEntities2d Is Nothing Then
                pointEntity2dNames.Add("None")
            Else
                For Each pointEntity2d As SDK.PointEntity2d In SDKCon.GetActive().PointEntities2d
                    If Not String.IsNullOrEmpty(pointEntity2d.Name) Then pointEntity2dNames.Add(pointEntity2d.Name)
                Next
            End If

            pointEntity2dNames.Sort()
            Return pointEntity2dNames
        End Get
    End Property]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>